package com.yc.d0303;

import com.yc.util.VerifyCodeUtils;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;

@WebServlet("/vcode.s")
public class VcodeServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

        HttpSession session = request.getSession();
        String vcode = VerifyCodeUtils.outputImage(response);

        session.setAttribute("vcode",vcode);
    }


}
